package com.sc.nft.entity.vo;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class WebApplicationRequirementVO {
    @ApiModelProperty(value = "多组申请条件")
    private List<WebApplicationRequirementWhereVO> result;



     public Boolean whetherThereAreConditionsForPassing() {
         // 判定result是否为空,如果不为空,则使用Java8的lambda表达式获取satisfy为true的数据,如果存在数据则返回trye 如果不存在则false
            return CollUtil.isNotEmpty(result) && result.stream().anyMatch(WebApplicationRequirementWhereVO::getSatisfy);
     }
}
